﻿@using FsCms.Entity;
@model FsCms.Entity.ArticleContent
@{ Layout = ""; }

<form class="layui-form" action="" id="frm_DocContentEdit">
    <div class="form-module-content">
        <div class="layui-form-item">
            <label class="layui-form-label">文章分类 </label>
            <div class="layui-input-block">
                @Html.HiddenFor(m => m.Id)
                @Html.HiddenFor(m => m.OriginType)
                @Html.HiddenFor(m => m.WatchCount)
                @Html.HiddenFor(m => m.StarCount)
                @Html.HiddenFor(m => m.CreateBy)
                @Html.HiddenFor(m => m.CreateDt)
                @Html.HiddenFor(m => m.DocContent)
                @Html.DropDownList("TypeID", ViewBag.ArticleTypeList as List<SelectListItem>, "", new Dictionary<string, object> { { "class", "plate_text" } })
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">文章标题</label>
            <div class="layui-input-block">
                @Html.TextBoxFor(m => m.Title, "", new Dictionary<string, object> { { "autocomplete", "off" }, { "class", "layui-input  " }, { "lay-verify", "title" }, { "placeholder", "请输入标题" } })
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">摘要</label>
            <div class="layui-input-block">
                @Html.TextBoxFor(m => m.Abstract, "", new Dictionary<string, object> { { "autocomplete", "off" }, { "class", "layui-input  " }, { "lay-verify", "title" }, { "placeholder", "请输入摘要" } })
            </div>
        </div>

        @*<div class="layui-form-item">
            <label class="layui-form-label">文章分类</label>
            <div class="layui-input-block">
                <input type="checkbox" name="like[write]" title="写作">
                <input type="checkbox" name="like[read]" title="阅读">
                <input type="checkbox" name="like[daze]" title="发呆">
            </div>
        </div>*@

        <div class="layui-form-item">
            <label class="layui-form-label">序号</label>
            <div class="layui-input-block">
                @Html.TextBoxFor(m => m.SortNum, "", new Dictionary<string, object> { { "autocomplete", "off" }, { "class", "layui-input  " }, { "lay-verify", "SortNum" } })
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="radio" name="status" value="1" title="启用" @(Model.Status == 1 ? "checked='checked'" : "")>
                <input type="radio" name="status" value="0" title="关闭" @(Model.Status == 0 ? "checked='checked'" : "")>
            </div>
        </div>

        @*<div class="layui-form-item">
            <label class="layui-form-label">来源类型</label>
            <div class="layui-input-block">
                <input type="checkbox" id="OriginType" @(Model.OriginType == 1 ? "checked=''" : "") name="OriginType" lay-skin="switch" lay-filter="switchTest" lay-text="当前内容|URL地址">
            </div>
        </div>*@

        <div class="layui-tab layui-tab-brief">
            <ul class="layui-tab-title" id="TabOriginType">
                <li class=' @(Model.OriginType == 1 ? "" : "layui-this")' origintype="0">自有内容</li>
                <li class=' @(Model.OriginType == 1 ? "layui-this" : "")' origintype="1">外部来源</li>
            </ul>
            <div class="layui-tab-content" style="min-height: 270px;">
                <div class='layui-tab-item  @(Model.OriginType == 1 ? "" : "layui-show")'>
                    <div class="layui-form-item layui-form-text" id="DocContentArea">
                        <div id="DocContentHtml">
                        </div>
                    </div>
                </div>
                <div class='layui-tab-item  @(Model.OriginType == 1 ? "layui-show" : "")'>
                    <div class="layui-form-item" id="OriginUrlArea">
                        <label class="layui-form-label">外部来源</label>
                        <div class="layui-input-block">
                            @Html.TextBoxFor(m => m.OriginUrl, "", new Dictionary<string, object> { { "autocomplete", "off" }, { "class", "layui-input  " }, { "lay-verify", "title" }, { "placeholder", "请输入标题" } })
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    @*<div class="form-module-footer">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
        </div>*@
</form>